//Accepted
#include <cstdio>
#include <cstring>
#include <string>
#include <iostream>
using namespace std;

string s, t;
int n, m, i, j;
int main(){
	//freopen("in.txt", "r", stdin);//freopen("out.txt", "w", stdout);
	
	while(cin>>s>>t){
		n=s.size();
		m=t.size();
		for(i=j=0;j<m&&n;){
			if(s[i]==t[j]){
				--n;
				++i;
				++j;
			}
			else ++j;
		}
		
		if(n)printf("No\n");
		else printf("Yes\n");
	}
	
	return 0;
}
